### Project 6 Light Up Stars **1.Description** When it comes to stars, we often describe them with a host of sound words, which like bright eyes and silver lamps. Thus, in this project, we seek to make a experiment named “Light Up Stars”. Task analysis | Sensor | Button Module | | ---------- | ---------------------------------------------------- | | Role | Stars | | Background | Stars | | Result | Press the button can light up stars in the night sky | **2.Button Sensor Introduction** ![](media/image-20251208103548491.png) keyestudio button module mainly uses a button component, which is a digital signal output device. There are 6 ports on the module and those marked in the same name are connected. When using, we solely need to connect any G port to the GND port of the control board, V port to the 5V port and S port to the digital input port. When the button is pressed, the S signal port will input a high level signal, otherwise, it will output a low level signal. **Specifications** - Operating voltage: DC 3.3~5V - Output signal:Digital signal - Dimension: 31mm*27mm*6.5mm - Weight: 1.8g - Environmental protection attributes: ROHS **3.Components Needed** | Control Board * 1 | USB Cable*1 | Alligator Clip Wire*3 | Button Module*1 | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | | ![](media/image-20251208103657693.png) | ![](media/image-20251208103703272.png) | ![](media/image-20251208103708939.png) | ![](media/image-20251208103715095.png) | **4.Connection Diagram** ![](media/image-20251208103741533.png) **5.Test Program** 1.Open“KidsBlock”software to create a new project. 2.Delete the beetle role. 3.Select “Stars”:click the background library icon![](media/image-20251208103837290.png)(1)in the lower right corner to select Stars. ![](media/image-20251208103854416.png) 4.Paint a star ①Select "Brush" and use the tool![](media/image-20251208103919011.png)to draw a square with a filling color![](media/image-20251208103937942.png)of no border![](media/image-20251208103950729.png). ② Select the tool![](media/image-20251208104013555.png),click the center point of one side of the square and drag it down, as shown in figure 2.3.2. The operations of the other three edges are the same as above. ![](media/image-20251208104114413.png) ③Select the tool![](media/image-20251208104127984.png)to adjust the role, then rotate the entire pattern and name the role star if it is adjusted. ![](media/image-20251208104158592.png) 5.Build the program ①Select “star”and build the program. ![](media/image-20251208104238463.png) ![](media/image-20251208104244317.png) ![](media/image-20251208161610865.png) 6.Copy the role star in the role area and increase the number of stars. At this time, the program and shape of the role will be copied together, and multiple copies can be made. ![](media/image-20251208104323627.png) 7.Save the project and name it“Light Up Stars” **6.Complete Program** ![](media/image-20251208104731352.png) **7.Test Result** Connect the device and select the port, then click![](media/image-20251208105223137.png)to light up stars, as shown below: ![](media/image-20251208105235060.png) **8.Program Explanation** | Instruction | Function | | -------------------------------------- | ------------------------------------------------------------ | | ![](media/image-20251208105320699.png) | Execute it repeatedly | | ![](media/image-20251208105335688.png) | When the button is pressed, stars will be displayed randomly, otherwise, the stars will not be displayed |